package com.ruoyi.web.controller.tool;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.utils.ip.IpUtils;
import org.springframework.core.env.Environment;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;

@Anonymous
@RestController
@RequestMapping("/tool/jm")
public class ReportController {
    
    @Autowired
    Environment environment;
    
    //报表设计
    @PreAuthorize("@ss.hasPermi('tool:report:list')")
    @GetMapping(value = "/reportList")
    public String ReportList(){
        return "http://" + IpUtils.getHostIp() + ":" + environment.getProperty("server.port") + "/jmreport/list";
//        return "/jmreport/list";
   
    }
    
    //报表查看
    @GetMapping(value = "/reportView")
    public String ReportView(){
        return "http://" + IpUtils.getHostIp() + ":" + environment.getProperty("server.port") + "/jmreport/view";
    }
    
    //报表查看
    @GetMapping(value = "/biList")
    public String bi(){
        return "http://" + IpUtils.getHostIp() + ":" + environment.getProperty("server.port") + "/drag/list";
    }
    
    //报表查看
    @GetMapping(value = "/biView")
    public String biView(){
        return "http://" + IpUtils.getHostIp() + ":" + environment.getProperty("server.port") + "/drag/share/view";
    }
}